<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<div region="north" split="true" style="padding: 10px;">
<form id="user_form_" method="post"  style="margin:0;padding:0">
	<input type="hidden" name="uuid" value="${User.uuid }">
	<input type="hidden" name="type" value="${User.type }">
	<table align="center">
			<tr>
				<td>用户姓名：</td>
				<td><input class="easyui-validatebox" type="text" required="true" name="name" value="${User.name }" style="width: 200px;" /></td>
			</tr>
			<tr>
				<td>用户登陆账号：</td>
				<td><input class="easyui-validatebox" type="text" required="true" name="loginName" value="${User.loginName }" style="width: 200px;" 
					<c:if test="${!empty User.uuid}">readonly="readonly" </c:if>/></td>
			</tr>
			<c:choose>
				<c:when test="${empty User.uuid}">
					<tr>
						<td>用户密码：</td>
						<td><input class="easyui-validatebox" type="password" name="loginPassword" required="true" value="${User.loginPassword }" style="width: 200px;" /></td>
					</tr>
				</c:when>
				<c:otherwise>
					<input type="hidden" name="loginPassword" value="${User.loginPassword }">
				</c:otherwise>
			</c:choose>
			<tr>
				<td>联系电话：</td>
				<td><input type="text" name="phone" value="${User.phone }" style="width: 200px;" /></td>
			</tr>
			<tr>
				<td>账号状态：</td>
				<td>
					<select class="easyui-combobox" editable="false" name="status" required="true" style="width:200px;" panelHeight="auto">  
					    <option value="1" <c:if test="${User.status == 1}">selected="selected"</c:if>>启用</option>  
					    <option value="0" <c:if test="${User.status == 0}">selected="selected"</c:if>>禁用</option>  
					</select>  
				</td>
			</tr>
			
				<tr>
				<td>角色名称：</td>
				<td>
					<input id="userRole_" name="role.uuid" class="easyui-combobox" required="true" style="width:200px;" data-options="  
				        valueField: 'uuid',  
				        textField: 'name',  
				        editable:false,
				        panelHeight: 'auto',
				        url: '<c:url value="/system/role/findRolesComJson.do"/>',  
				        onLoadSuccess: function(){  
				            $('#userRole_').combobox('select', '${User.role.uuid }');
				     }" /> 
				</td>
			</tr>
			
	</table>
</form>
</div>
